

<div style="width: 500px">
	<#if type == "LIKE">
		<span style="float:left"><h3 style="padding:10px 0px;width:550px">Danh sách thành viên thích bài viết (${total})</h3></span>
		<#assign prevPageLink = "${rc.contextPath}/ajax/userList.html?type=" + type + "&componentId=" + componentId + "&component=" + component + "&pageId=" + (page.pageNumber-1) + "&total=" + total />
		<#assign nextPageLink = "${rc.contextPath}/ajax/userList.html?type=" + type + "&componentId=" + componentId + "&component=" + component + "&pageId=" + (page.pageNumber+1) + "&total=" + total />
	<#elseif type == "CHEER_ENTRY">
		<#if isEntryDone == 'true'>
			<span style="float:left"><h3 style="padding:10px 0px;width:550px">Danh sách chúc mừng (${total})</h3></span>
		<#else>
			<span style="float:left"><h3 style="padding:10px 0px;width:550px">Danh sách động viên (${total})</h3></span>
		</#if>
		<#assign prevPageLink = "${rc.contextPath}/ajax/userList.html?type=" + type + "&entryId=" + entryId + "&isEntryDone=" + isEntryDone + "&pageId=" + (page.pageNumber-1) + "&total=" + total />
		<#assign nextPageLink = "${rc.contextPath}/ajax/userList.html?type=" + type + "&entryId=" + entryId + "&isEntryDone=" + isEntryDone + "&pageId=" + (page.pageNumber+1) + "&total=" + total />
	<#elseif type == "FRIEND">
		<span style="float:left"><h3 style="padding:10px 0px;width:550px">Danh sách bạn bè (${total})</h3></span>
		<#assign prevPageLink = "${rc.contextPath}/ajax/userList.html?type=" + type + "&username=" + username + "&pageId=" + (page.pageNumber-1) + "&total=" + total />
		<#assign nextPageLink = "${rc.contextPath}/ajax/userList.html?type=" + type + "&username=" + username + "&pageId=" + (page.pageNumber+1) + "&total=" + total />
	<#elseif type == "USER_GOAL">
		<span style="float:left"><h3 style="padding:10px 0px;width:550px">Những người đã và đang thực hiện mục tiêu (${total})</h3></span>
		<#assign prevPageLink = "${rc.contextPath}/ajax/userList.html?type=" + type + "&goalId=" + goalId + "&pageId=" + (page.pageNumber-1) + "&total=" + total />
		<#assign nextPageLink = "${rc.contextPath}/ajax/userList.html?type=" + type + "&goalId=" + goalId + "&pageId=" + (page.pageNumber+1) + "&total=" + total />
	</#if>
	
	<#if page??>
		<#list page.items as friend>
			<#assign avatar="/images/avatar.png"/>
			<#if friend.avatar??>
				<#assign avatar=friend.avatar/>
			</#if>
			<div class="hintFriend">
		  		<div class="avatar"><a href="/${friend.username}"><img src="${avatar}" alt="${friend.username}" width="50" height="50"></a></div>
		  		<div class="infofriend">
		  			<a class="friendname" href="/${friend.username}"><#if friend.fullName??>${friend.fullName}<#else>${friend.username}</#if></a>
		    		${friend.loggined?string('<div class="on">ONLINE</div>','<div class="off">OFFLINE</div>')}	    		
		  		</div>
			</div>
			<div class="w6"></div>
		    <div class="w3"></div>
		    <div class="w6"></div>
		</#list>
		
		<#if page.totalPage gt 1>
			<#assign nextPage = true />
			<#assign prevPage = true />
			<#if page.pageNumber == 1>
				<#assign prevPage = false />
			</#if>
			<#if page.pageNumber == page.totalPage>
				<#assign nextPage = false />
			</#if>
			<!--p>Trang ${page.pageNumber}/${page.totalPage}</p-->
			<div class="allFriendPaging">
				<span style="float:left;<#if !prevPage>color:#cecece;</#if>"><#if prevPage><a class="icon_1 allFriendBack" id="prev_button" href="${prevPageLink}">Trang trước</a></#if></span>
				<span style="float:right;<#if !nextPage>color:#cecece;</#if>"><#if nextPage><a class="icon_1 allFriendNext" id="next_button" href="${nextPageLink}">Trang sau</a></#if></span>
				<script type="text/javascript">
					jQuery("#prev_button").fancybox({
						'scrolling': 'no'
					});
					jQuery("#next_button").fancybox({
						'scrolling': 'no'
					});
				</script>
			</div>
		</#if>
	</#if>
</div>